package com.example.demo4_sport.common;

import com.alibaba.fastjson.JSON;

import java.util.HashMap;

public class ResultMapUtils {


    private static HashMap<String,Object> hashMap = new HashMap<>();

    public static String returnResult(Object msg,String code){
        hashMap.put("code",code);
        hashMap.put("msg",msg);
        return JSON.toJSONString(hashMap);
    }

    public static String returnAllUsersResult(Object numbers,Object users){
        hashMap.put("numbers",numbers);
        hashMap.put("users",users);
        return JSON.toJSONString(hashMap);
    }
}
